using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Lzfy_Refund_Service.Models
{
    /// <summary>
    /// 退款审核工作表
    /// </summary>
    [Table("lzfy_refund_acct")]
    public class RefundAcct
    {
        /// <summary>
        /// 主键ID
        /// </summary>
        [Key]
        [Column("id")]
        public int Id { get; set; }

        /// <summary>
        /// 数据录入时间
        /// </summary>
        [Column("input_date")]
        public DateTime? InputDate { get; set; }

        /// <summary>
        /// 用户ID
        /// </summary>
        [Column("username")]
        [StringLength(50)]
        public string? Username { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        [Column("full_name")]
        [StringLength(100)]
        public string? FullName { get; set; }

        /// <summary>
        /// 结算ID
        /// </summary>
        [Column("acct_id")]
        [StringLength(50)]
        public string? AcctId { get; set; }

        /// <summary>
        /// 本单总金额
        /// </summary>
        [Column("refund_balance_sum", TypeName = "numeric(14,2)")]
        public decimal? RefundBalanceSum { get; set; }
    }

    /// <summary>
    /// 创建退款审核工作记录请求
    /// </summary>
    public class RefundAcctCreateRequest
    {
        /// <summary>
        /// 用户ID
        /// </summary>
        [StringLength(50)]
        public string? Username { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        [StringLength(100)]
        public string? FullName { get; set; }

        /// <summary>
        /// 结算ID
        /// </summary>
        [Required]
        [StringLength(50)]
        public string AcctId { get; set; } = string.Empty;

        /// <summary>
        /// 本单总金额
        /// </summary>
        public decimal? RefundBalanceSum { get; set; }
    }

    /// <summary>
    /// 更新退款审核工作记录请求
    /// </summary>
    public class RefundAcctUpdateRequest
    {
        /// <summary>
        /// 主键ID
        /// </summary>
        [Required]
        public int Id { get; set; }

        /// <summary>
        /// 用户ID
        /// </summary>
        [StringLength(50)]
        public string? Username { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        [StringLength(100)]
        public string? FullName { get; set; }

        /// <summary>
        /// 结算ID
        /// </summary>
        [Required]
        [StringLength(50)]
        public string AcctId { get; set; } = string.Empty;

        /// <summary>
        /// 本单总金额
        /// </summary>
        public decimal? RefundBalanceSum { get; set; }
    }

    /// <summary>
    /// 退款审核工作记录响应
    /// </summary>
    public class RefundAcctResponse
    {
        /// <summary>
        /// 主键ID
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// 数据录入时间
        /// </summary>
        public DateTime? InputDate { get; set; }

        /// <summary>
        /// 用户ID
        /// </summary>
        public string? Username { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        public string? FullName { get; set; }

        /// <summary>
        /// 结算ID
        /// </summary>
        public string? AcctId { get; set; }

        /// <summary>
        /// 本单总金额
        /// </summary>
        public decimal? RefundBalanceSum { get; set; }
    }
}